# Windows users: install git for Windows and optionally Console2 to issue commands from within there
# source: Installing Ionic

# source: Getting started with Ionic
# caveat: Node 5 does not work at the moment
npm install -g cordova ionic
# follow the guides on Cordova for installation of Android and iOS toolchain
# see linux android and windows on java notes
ionic platform add ios
ionic platform add android
ionic build ios
ionic emulate ios
ionic build android
ionic emulate android

# see installing ionic for a reference on project structure and the meaning of each folder.

# source: ngCordova documentation
bower install ngCordova
cordova plugin add cordova-plugin-file

# source: how to write automated tests
npm install karma --save-dev
npm install karma-jasmine --save-dev
bower install angular-mocks#1.3.13 --save-dev 
npm install -g karma-cli 
npm install -g phantomjs 

cd tests
karma init unit-tests.conf.js 
# Hit enter on every question to choose the default value, except for the following two questions.
# Do you want to capture any browsers automatically ? > PhantomJS 
# Next, input all the files that are needed for your tests to run. It's basically the same list of files that are included in your index.html and all the test files: What is the location of your source and test files ?    karma start unit-tests.conf.js

npm install -g protractor
webdriver-manager update
ionic serve --nobrowser 
protractor e2e-tests.conf.js 

# go out of tests directory
cd ..
#source: angular-xml on github
bower i --save angular-xml

